package com.project.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.project.bean.UserBean;
import com.project.bean.UserResultBean;
import com.project.mapper.IUserMapper;
import com.project.service.IUserResultService;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

@RestController
@RequestMapping("userResult")
public class UserResultController {
      @Autowired
      private IUserResultService service;
      @Autowired
      private IUserMapper userMapper;
      @RequestMapping("findByUserNum")
      public List<UserResultBean> findByUserNum(HttpServletRequest request){
            UserBean userBean= (UserBean) request.getSession().getAttribute("loginUser");
            return service.findByUserNum(userBean.getUserNum());
      }
      
}
